package com.fjl;

public class T {
    public static void main(String[] args) {
        int cores=Runtime.getRuntime().availableProcessors();
        System.out.println("开始测试");

        for(int i=0;i<cores;i++){
            new Thread(new Runnable() {
                            String name = Thread.currentThread().toString();
                            long l=System.currentTimeMillis()+60000;
                            @Override
                            public void run() {
                                while(System.currentTimeMillis()<l){
                                    Math.pow(Math.random(),Math.random());
                                }
                                System.out.println(name+"结束");
                            }
                        }, "name"+i).start();
        }
    }
}
